import {getRequest, postRequest, putRequest,deleteRequest} from "@/utils/request_utils";

export default {
  //订单详情  获取下拉选信息
  initData: () =>
    getRequest(`~/orderDetailInfo/init`),
  //订单详情 获得list列表信息 模糊查询
  findOrderDetailInfoList:(params)=>
    getRequest(`~/orderDetailInfo/getList`,{params}),

  excuteDeliverInfo:(data)=>
      postRequest(`~/orderDetailInfo/excuteDeliver`,{params}),

  //订单详情 根据主键获得一条数据的详细信息
  findOrderDetailInfo: (params) =>
    getRequest(`~/orderDetailInfo/getOrderDetailInfo`,{params}),
  //订单详情 获取所有的订单号
  getAllOrderCode: (params) =>
    getRequest(`~/orderDetailInfo/getAllOrderCode`,{params}),
  //订单详情 根据订单号获取订单信息和关联的物料号
  getOrderInfoByOrderCode:(params)=>
    getRequest(`~/orderDetailInfo/getOrderInfoByOrderCode`,{params}),
  //订单详情 根据物料号 获取物料信息的详细信息
  getMaterialInfoByMaterialCode:(params)=>
    getRequest(`~/orderDetailInfo/getMaterialInfoByMaterialCode`,{params}),
  //订单详情 check 物料号和订单号是否存在
  checkOrderCodeAndMaterialCode:(params)=>
    getRequest(`~/orderDetailInfo/checkOrderCodeAndMaterialCode`,{params}),


  //订单详情 根据主键修改一条数据
  updateOrderDetailInfo:(data)=>
    putRequest(`~/orderDetailInfo/updateOrderDetailInfo`, {data}),
  //订单详情 添加一条数据
  addOrderDetailInfo:(data)=>
    postRequest(`~/orderDetailInfo/addOrderDetailInfo`, {data}),
  //订单详情 删除一组数据
  deleteByIds:(data)=>
    putRequest(`~/orderDetailInfo/deleteOrderDetailInfo` ,{data}),
  //订单详情 审批一组数据
  approvalByIds:(data)=>
    putRequest(`~/orderDetailInfo/approval` ,{data}),
  //订单详情 发货一组数据
  deliverGoodsByIds:(data)=>
    putRequest(`~/orderDetailInfo/deliverGoods` ,{data}),
  //订单详情 导出功能
  exportData:(data) =>
    postRequest(`~/orderDetailInfo/exportData`,{data,responseType:'blob'}),

  //订单详情 发货列表 确认发货
  excuteDeliver:(data)=>
    putRequest(`~/orderDetailInfo/excuteDeliver` ,{data}),

  //订单详情 发货列表 确认发货 更新 t_deliver_info_split 表
  excuteDeliverSplit:(data)=>
    putRequest(`~/orderDetailInfo/excuteDeliverSplit` ,{data}),

  //订单详情 发货列表  初始化数据
  sendGoodsInit:()=>
    getRequest(`~/orderDetailInfo/sendGoodsInit`),

  //订单详情 发货列表  获得list列表信息
  finddeliverGoodsList:(params)=>
    getRequest(`~/orderDetailInfo/deliverGoods`,{params}),
}
